/********************************************************************************
 *      Copyright:  (C) 2025 iot25<lingyun@email.com>
 *                  All rights reserved.
 *
 *       Filename:  client_connect_sever.h
 *    Description:  This file client_connect_sever.h
 *
 *        Version:  1.0.0(07/05/25)
 *         Author:  iot25 <lingyun@email.com>
 *      ChangeLog:  1, Release initial version on "07/05/25 17:55:43"
 *                 
 ********************************************************************************/
#ifndef _CLIENT_CONNECT_SERVER_H_
#define _CLIENT_CONNECT_SERVER_H_

#include<netdb.h>
typedef struct socket_s
{
	int			fd;
	char		host[128];
	int			port;
	int			connected; 
	int			saved_flags; 
}socket_t;

int socket_init(socket_t *sock, char *hostname, int port);
int get_addr_info(const char *host, const char *port, struct addrinfo **res);
int client_connect_server(socket_t *sock);
int socket_close(socket_t *sock);

#endif

